package com.gcorp.idealgas;

public class myPoint
{
    private float x;
    
    private float y;
    
    myPoint()
    {
        x = y = 0;
    }
    
    myPoint(float x,float y)
    {
        this.x = x;
        this.y = y;
    }
    myPoint(double x,double y)
    {
        this.x = (float)x;
        this.y = (float)y;
    }
    public myPoint sub(myPoint p)
    {
        return new myPoint(this.x - p.getX(), this.y - p.getY());
    }
    public myPoint add(myPoint p)
    {
        return new myPoint(this.x + p.getX(),this.y + p.getY());
    }
    public void incX(float x)
    {
    	this.x += x;
    }
    public void incY(float y)
    {
    	this.y += y;
    }
    public void decX(float x)
    {
    	this.x -= x;
    }
    public void decY(float y)
    {
    	this.y -= y;
    }
    public void reverse()
    {
        this.x = -this.x;
        this.y = -this.y;
    }
    
    
    public float getX()
    {
        return x;
    }
    public float getY()
    {
        return y;
    }
    
    public void setX(float x)
    {
        this.x = x;
    }
    public void setY(float y)
    {
        this.y = y;
    }
}